<?php 
class Md_PostTag extends WdkModel
{
	public function __construct()
	{
		parent::__construct();
		$this->_init();
	}
	
	private function _init()
	{
		$this->table	= 'post_tag';
		$this->order	= array();
	}
	
	/**
	 *	Select query for Classes..
	 *  @author	kinuz
	 *  @since	2011. 3. 25
	 */
	public function cLoad($post_tag_seq)
	{
		return $this->getData("*", array("`post_tag_seq` = '{$this->escape($post_tag_seq)}'"));
	}
	
	/**
	 *	Select query for Classes..
	 *  @author	kinuz
	 *  @since	2011. 3. 25
	 */
	public function cLoadByCode($fk_post_seq=0, $post_tag_code='')
	{
		return $this->getData("*", array("`fk_post_seq` = '{$this->escape($fk_post_seq)}'", "`post_tag_code` = '{$post_tag_code}'"));
	}
	
	/**
	 *	Select query for Classes..
	 *  @author	kinuz
	 *  @since	2011. 3. 25
	 */
	public function clearByPost($post_seq=0)
	{
		if($post_seq == 0) return;
		$sql = "DELETE
				FROM
					`{$this->table}`
				WHERE `fk_post_seq` = {$this->escape($post_seq)}
						";
		$this->dbo->execute($sql);
	}
}